Skip to content

Add embedding create and rerank commands - #357

Open
hopelynd wants to merge 3 commits into
mainfrom
feat/embedding-create-and-rerank
Open

hopelynd wants to merge 3 commits into
mainfrom
feat/embedding-create-and-rerank

Conversation

@hopelynd

Copy link
Copy Markdown
Collaborator

Summary

  • Add bl embedding create for text and multimodal DashScope embeddings with a small local route table, Data URI media handling, and JSON/--out full-vector output
  • Add bl rerank for native text/multimodal document reranking with preserved server index/score payloads and documents-file path rules
  • Wire hub skill routing, README capability notes, generated reference, and offline/loopback/live-gated e2e coverage

Description

This branch exposes two new API Key commands for direct vector and ranking workflows without going through knowledge-base search.

embedding create defaults to text-embedding-v4 for text-only input and qwen3-vl-embedding when media is present. Known models are routed explicitly (compatible text vs native multimodal); unknown IDs are rejected locally without prefix guessing. Local images are encoded as Data URIs (no temporary OSS upload), videos accept public HTTP(S) URLs only, and --fuse / dimensions / input counts follow the route table. Dry-run redacts Data URIs and marks pending local encodes; text mode prints a summary rather than dumping vectors.

rerank defaults to qwen3-rerank on the native text-rerank endpoint and also supports gte-rerank-v2, qwen3.7-text-rerank, and qwen3-vl-rerank. Query and document sources are mutually exclusive pairs; media paths in --documents-file resolve relative to that file, while --query-image uses cwd. The CLI preserves server ordering and document objects and does not re-sort or merge scores across batches.

Hub bailian-cli routing distinguishes these bare API commands from knowledge-base indexing/retrieval hand-offs.

- Removed unused functions and constants from rerank and embedding command files.
- Simplified error handling by replacing custom usageError function with throwUsage.
- Updated embedding model specifications to enforce input limits for new models.
- Enhanced error messages to include supported model IDs for better user guidance.
- Improved documentation for embedding and rerank commands to clarify usage and limitations.
@hopelynd
hopelynd force-pushed the feat/embedding-create-and-rerank branch from c9f7f20 to f22d638 Compare December 2, 2026 07:51

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant